<?php
/** 
 * Copyright (C) 2009 João Neto
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * @version default - 19/07/2009 - joaoneto
 * @package Expression package is undefined on line 24, column 28 in Templates/Scripting/EmptyPHP_1.
 */
defined('_JEXEC') or die( 'Restricted access' ); //no direct access
/**
 * Default View to Product
 * List all products in the database
 */
?>
<p>
	<form id="adminForm" action="index.php" method="POST">
		<?php echo $this->form->render( 'params', 'lang' ); ?>
		<?php echo $this->form->render( 'params', 'info' ); ?>
		<input type="hidden" value="<?php echo $this->_option; ?>" name="option"/>
		<input type="hidden" value="save" name="task"/>
		<input type="hidden" value="category" name="controller"/>

		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
</p>

<script>
	function submitbutton( type )
	{
		if( type == 'cancel' ){
			window.location.href = '<?php echo JRoute::_( 'index.php?option=com_jloja&controller=category', false ); ?>';
			return;
		}

		$( 'adminForm' ).submit();
	}
</script>